package com.kinoshita.common.result;

import com.kinoshita.common.status.StatusCode;

public class WebResultDO<T> {

    private int status;

    private String message;

    private T data;

    public WebResultDO() {

    }

    public WebResultDO(StatusCode statusCode) {
        this.status = statusCode.getCode();
        this.message = statusCode.getMsg();
    }

    public WebResultDO(StatusCode statusCode, T data) {
        this(statusCode);
        this.data = data;
    }

    public WebResultDO(int status, String message) {
        this.status = status;
        this.message = message;
    }

    public WebResultDO(int status, String message, T data) {
        this(status, message);
        this.data = data;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
